package com.smallrig.mall.template.chain;

import org.apache.commons.chain.Context;
import org.apache.commons.chain.impl.ChainBase;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class OrderSubmitChain extends ChainBase implements InitializingBean {

    @Resource
    private OrderSubmitInfoCommand orderSubmitInfoCommand;

    @Resource
    private OrderSubmitSaveCommand orderSubmitSaveCommand;

    @Override
    public void afterPropertiesSet() throws Exception {
        this.addCommand(orderSubmitInfoCommand);
        this.addCommand(orderSubmitSaveCommand);
    }


    @Override
    public boolean execute(Context context) throws Exception {
        return super.execute(context);
    }
}

